Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unassigned ml system shard replicas #1315

Merged
merged 10 commits into from
Sep 9, 2023

Conversation

b4sjoo
Copy link
Collaborator

@b4sjoo b4sjoo commented Sep 9, 2023

Description

In previous ml system shard replicas always stays on an arbitrary number and cannot expand automatically, which will cause unassigned shards and yellow cluster problem. This PR can resolve this issue.

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>
@b4sjoo b4sjoo temporarily deployed to ml-commons-cicd-env September 9, 2023 01:44 — with GitHub Actions Inactive
@b4sjoo b4sjoo temporarily deployed to ml-commons-cicd-env September 9, 2023 01:44 — with GitHub Actions Inactive
…etting

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>
@b4sjoo b4sjoo temporarily deployed to ml-commons-cicd-env September 9, 2023 01:53 — with GitHub Actions Inactive
@b4sjoo b4sjoo temporarily deployed to ml-commons-cicd-env September 9, 2023 01:53 — with GitHub Actions Inactive
@b4sjoo b4sjoo temporarily deployed to ml-commons-cicd-env September 9, 2023 01:53 — with GitHub Actions Inactive
@b4sjoo b4sjoo temporarily deployed to ml-commons-cicd-env September 9, 2023 01:53 — with GitHub Actions Inactive
…r.java

Co-authored-by: Yaliang Wu <ylwu@amazon.com>
Signed-off-by: Sicheng Song <sicheng.song@outlook.com>
@codecov
Copy link

codecov bot commented Sep 9, 2023

Codecov Report

Merging #1315 (596bb7c) into 2.x (104b1b7) will decrease coverage by 0.20%.
The diff coverage is 21.05%.

@@             Coverage Diff              @@
##                2.x    #1315      +/-   ##
============================================
- Coverage     79.40%   79.20%   -0.20%     
+ Complexity     2247     2245       -2     
============================================
  Files           188      188              
  Lines          9074     9089      +15     
  Branches        903      904       +1     
============================================
- Hits           7205     7199       -6     
- Misses         1461     1481      +20     
- Partials        408      409       +1     
Flag Coverage Δ
ml-commons 79.20% <21.05%> (-0.20%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
...va/org/opensearch/ml/indices/MLIndicesHandler.java 59.34% <21.05%> (-10.40%) ⬇️

... and 2 files with indirect coverage changes

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>
@b4sjoo b4sjoo temporarily deployed to ml-commons-cicd-env September 9, 2023 02:14 — with GitHub Actions Inactive
@b4sjoo b4sjoo temporarily deployed to ml-commons-cicd-env September 9, 2023 02:14 — with GitHub Actions Inactive
Signed-off-by: Sicheng Song <sicheng.song@outlook.com>
@b4sjoo b4sjoo temporarily deployed to ml-commons-cicd-env September 9, 2023 02:18 — with GitHub Actions Inactive
@b4sjoo b4sjoo temporarily deployed to ml-commons-cicd-env September 9, 2023 02:18 — with GitHub Actions Inactive
@b4sjoo b4sjoo temporarily deployed to ml-commons-cicd-env September 9, 2023 02:41 — with GitHub Actions Inactive
Copy link
Collaborator

@ylwu-amzn ylwu-amzn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for the change!

@b4sjoo b4sjoo temporarily deployed to ml-commons-cicd-env September 9, 2023 03:14 — with GitHub Actions Inactive
@b4sjoo b4sjoo temporarily deployed to ml-commons-cicd-env September 9, 2023 03:14 — with GitHub Actions Inactive
@b4sjoo b4sjoo temporarily deployed to ml-commons-cicd-env September 9, 2023 03:14 — with GitHub Actions Inactive
@ylwu-amzn ylwu-amzn merged commit 56976e1 into opensearch-project:2.x Sep 9, 2023
6 of 9 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 9, 2023
* Fix unassigned ml system shard replicas

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Adjust auto replica settings to keep it consistent with AOS default setting

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Update plugin/src/main/java/org/opensearch/ml/indices/MLIndicesHandler.java

Co-authored-by: Yaliang Wu <ylwu@amazon.com>
Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Modify exception handling

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Modify exception messages

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Add response check

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Add response check and exception handling

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Keep error message consistent

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Keep error message consistent

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Keep error message consistent

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

---------

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>
Co-authored-by: Yaliang Wu <ylwu@amazon.com>
(cherry picked from commit 56976e1)
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 9, 2023
* Fix unassigned ml system shard replicas

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Adjust auto replica settings to keep it consistent with AOS default setting

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Update plugin/src/main/java/org/opensearch/ml/indices/MLIndicesHandler.java

Co-authored-by: Yaliang Wu <ylwu@amazon.com>
Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Modify exception handling

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Modify exception messages

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Add response check

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Add response check and exception handling

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Keep error message consistent

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Keep error message consistent

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Keep error message consistent

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

---------

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>
Co-authored-by: Yaliang Wu <ylwu@amazon.com>
(cherry picked from commit 56976e1)
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.x 2.x
# Navigate to the new working tree
cd .worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-1315-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 56976e1078e445f27f2358cf066ec45a9d012a9a
# Push it to GitHub
git push --set-upstream origin backport/backport-1315-to-2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-1315-to-2.x.

@b4sjoo b4sjoo added bug Something isn't working and removed backport 2.x labels Sep 9, 2023
@b4sjoo b4sjoo deleted the 2.x_index branch September 9, 2023 04:56
b4sjoo added a commit to b4sjoo/ml-commons that referenced this pull request Sep 12, 2023
* Fix unassigned ml system shard replicas

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Adjust auto replica settings to keep it consistent with AOS default setting

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Update plugin/src/main/java/org/opensearch/ml/indices/MLIndicesHandler.java

Co-authored-by: Yaliang Wu <ylwu@amazon.com>
Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Modify exception handling

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Modify exception messages

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Add response check

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Add response check and exception handling

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Keep error message consistent

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Keep error message consistent

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Keep error message consistent

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

---------

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>
Co-authored-by: Yaliang Wu <ylwu@amazon.com>
Signed-off-by: Sicheng Song <sicheng.song@outlook.com>
b4sjoo added a commit that referenced this pull request Sep 12, 2023
* Fix unassigned ml system shard replicas

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Adjust auto replica settings to keep it consistent with AOS default setting

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Update plugin/src/main/java/org/opensearch/ml/indices/MLIndicesHandler.java

Co-authored-by: Yaliang Wu <ylwu@amazon.com>
Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Modify exception handling

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Modify exception messages

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Add response check

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Add response check and exception handling

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Keep error message consistent

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Keep error message consistent

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Keep error message consistent

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

---------

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>
Co-authored-by: Yaliang Wu <ylwu@amazon.com>
(cherry picked from commit 56976e1)

Co-authored-by: Sicheng Song <sicheng.song@outlook.com>
b4sjoo added a commit that referenced this pull request Sep 12, 2023
* Fix unassigned ml system shard replicas

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Adjust auto replica settings to keep it consistent with AOS default setting

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Update plugin/src/main/java/org/opensearch/ml/indices/MLIndicesHandler.java

Co-authored-by: Yaliang Wu <ylwu@amazon.com>
Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Modify exception handling

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Modify exception messages

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Add response check

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Add response check and exception handling

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Keep error message consistent

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Keep error message consistent

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Keep error message consistent

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

---------

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>
Co-authored-by: Yaliang Wu <ylwu@amazon.com>
(cherry picked from commit 56976e1)

Co-authored-by: Sicheng Song <sicheng.song@outlook.com>
b4sjoo added a commit that referenced this pull request Sep 12, 2023
* Fix unassigned ml system shard replicas



* Adjust auto replica settings to keep it consistent with AOS default setting



* Update plugin/src/main/java/org/opensearch/ml/indices/MLIndicesHandler.java




* Modify exception handling



* Modify exception messages



* Add response check



* Add response check and exception handling



* Keep error message consistent



* Keep error message consistent



* Keep error message consistent



---------

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>
Co-authored-by: Yaliang Wu <ylwu@amazon.com>
zane-neo added a commit that referenced this pull request Sep 26, 2023
* Add Auto Release Workflow (#1306)

* Add Auto Release Workflow

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Fix release note address

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

---------

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Bump aws-encryption-sdk-java to fix CVE-2023-33201 (#1309)

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Add release note for 2.10.0 release (#1312)

* Add release note for 2.10.0

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Add CVE fix

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

---------

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* fixing doc link (#1318)

* fixing doc link

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

* fixing indentation

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

---------

Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>

* Fix unassigned ml system shard replicas (#1315) (#1324)

* Fix unassigned ml system shard replicas



* Adjust auto replica settings to keep it consistent with AOS default setting



* Update plugin/src/main/java/org/opensearch/ml/indices/MLIndicesHandler.java




* Modify exception handling



* Modify exception messages



* Add response check



* Add response check and exception handling



* Keep error message consistent



* Keep error message consistent



* Keep error message consistent



---------

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>
Co-authored-by: Yaliang Wu <ylwu@amazon.com>

* Adjust index replicas settings to keep consistent with AOS 2.9 (#1325)

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* Make 2.10 release notes up to date (#1345)

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>

* fix spelling (#1363)

Signed-off-by: Kalyan <kalyan.ben10@live.com>

* Add neural search default processor for non OpenAI/Cohere scenario (#1274)

* Add neural search default pre/post process function support

Signed-off-by: zane-neo <zaniu@amazon.com>

* Fix UT failures

Signed-off-by: zane-neo <zaniu@amazon.com>

* Address PR comment to remove nonJson response case

Signed-off-by: zane-neo <zaniu@amazon.com>

* Fix low code coverage issue

Signed-off-by: zane-neo <zaniu@amazon.com>

* fix format issue

Signed-off-by: zane-neo <zaniu@amazon.com>

* Try to fix classNotFound issue in IT

Signed-off-by: zane-neo <zaniu@amazon.com>

* revert Try to fix classNotFound issue in IT

Signed-off-by: zane-neo <zaniu@amazon.com>

* Change gson dependency to compileOnly

Signed-off-by: zane-neo <zaniu@amazon.com>

* Change default pre/post process function name

Signed-off-by: zane-neo <zaniu@amazon.com>

* Address code review comments

Signed-off-by: zane-neo <zaniu@amazon.com>

* Make preprocess function to default

Signed-off-by: zane-neo <zaniu@amazon.com>

* Remove GsonUtil since there already a single instance in StringUtils

Signed-off-by: zane-neo <zaniu@amazon.com>

* Fix UT failures

Signed-off-by: zane-neo <zaniu@amazon.com>

* Address comments

Signed-off-by: zane-neo <zaniu@amazon.com>

* use import instead of fully qualified name

Signed-off-by: zane-neo <zaniu@amazon.com>

---------

Signed-off-by: zane-neo <zaniu@amazon.com>

---------

Signed-off-by: Sicheng Song <sicheng.song@outlook.com>
Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>
Signed-off-by: Kalyan <kalyan.ben10@live.com>
Signed-off-by: zane-neo <zaniu@amazon.com>
Co-authored-by: Sicheng Song <sicheng.song@outlook.com>
Co-authored-by: Dhrubo Saha <dhrubo@amazon.com>
Co-authored-by: Yaliang Wu <ylwu@amazon.com>
Co-authored-by: Kalyan <kalyan.ben10@live.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants